package com.villaday.idf.adapter;

import android.content.Context;
import android.graphics.Typeface;
import android.view.View;
import android.widget.TextView;

import com.villaday.idf.R;
import com.villaday.idf.base.AbsRecyclerViewAdapter;
import com.villaday.idf.base.OnAdapterCallbackListener;
import com.villaday.idf.model.MYHousesEntity;
import com.villaday.idf.model.SimilarListEntity;
import com.villaday.idf.util.PhoneUtil;


public class SimilarListAdapter extends AbsRecyclerViewAdapter<SimilarListEntity.BodyEntity.DataListEntity> {
    private OnAdapterCallbackListener onAdapterCallbackListener;
    private View.OnClickListener onClickListener;
/*
    private final String roleType;
*/

    public SimilarListAdapter(Context context) {
        super(context, R.layout.item_samehouse, R.layout.item_page_loading,
                R.layout.item_page_bottom);

       /* RefreshtokenEntity.BodyBean roleInfo =
                SharedPreferencesUtil.getRoleInfo(context);
        roleType = roleInfo.getMember().getType();*/

    }




    @Override
    public void onBindHolder(AbsRecyclerViewAdapter.RecyclerViewHolder holder, SimilarListEntity.BodyEntity.DataListEntity d, int position) {
        holder.bindSimpleDraweeView(R.id.sdv,d.getImageURL()+"")
                .bindTextView(R.id.tv_title,d.getName())
                .bindTextView(R.id.tv_des,d.getDescription())
                .bindTextViewWithHtml(R.id.tv_yun,"&yen;")
                .bindTextViewWithHtml(R.id.tv_yuanNum, PhoneUtil.handleBalance(d.getCurrentPrice() / 100.0 + "", 0));




    }

}
